

* Open data
use "DataFinal.dta", replace

	
	
**********
** TABLE 1
**********

sum fair decacc if haspos == 1 & comprehension_passed == 1 & speeder == 0



**********
** TABLE 2
**********

* Procedural fairness
* Model 1
reg fair i.ca i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0
estimates store m1
* Model 2
reg fair i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0
estimates store m2
test 1.caFollowed = 1.caNotFollowed // Wald test of equality of coefficients
* Model 3
reg fair i.caFollowed##i.ref caNotFollowed##i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0
estimates store m3

* Decision acceptance
* Model 4
reg decacc i.ca i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0
estimates store m4
* Model 5
reg decacc i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0
estimates store m5
test 1.caFollowed = 1.caNotFollowed // Wald test of equality of coefficients
* Model 6
reg decacc i.caFollowed##i.ref caNotFollowed##i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0
estimates store m6




***********
** FIGURE 2
***********

gen y = 1 in 1/4
replace y = 2 in 5/8
gen d = 1 in 1/2
replace d = 2 in 3/4
replace d = 1 in 5/6
replace d = 2 in 7/8
gen mod = _n in 1/8
replace mod = mod - 1 in 1/2
replace mod = mod - 3 in 3/4
replace mod = mod - 5 in 5/6
replace mod = mod - 7 in 7/8
gen pe2 = .
gen se2 = .

reg fair i.caFollowed##i.ref caNotFollowed##i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0
test 1.caFollowed#1.ref 1.caNotFollowed#1.ref // Joint significance interaction with final decision mode: p = 0.07
margins, dydx(caFollowed caNotFollowed) at(ref = (0 1)) post
matrix margins = r(table)' // Saves marginal effects as variables
svmat margins, names(col)
sum b in 3
replace pe2 = `r(mean)' if d == 1 & mod == 0 & y == 1
sum b in 4
replace pe2 = `r(mean)' if d == 1 & mod == 1 & y == 1
sum b in 7
replace pe2 = `r(mean)' if d == 2 & mod == 0 & y == 1
sum b in 8
replace pe2 = `r(mean)' if d == 2 & mod == 1 & y == 1
sum se in 3
replace se2 = `r(mean)' if d == 1 & mod == 0 & y == 1
sum se in 4
replace se2 = `r(mean)' if d == 1 & mod == 1 & y == 1
sum se in 7
replace se2 = `r(mean)' if d == 2 & mod == 0 & y == 1
sum se in 8
replace se2 = `r(mean)' if d == 2 & mod == 1 & y == 1
drop b - eform

reg decacc i.caFollowed##i.ref caNotFollowed##i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0
test 1.caFollowed#1.ref 1.caNotFollowed#1.ref // Joint significance interaction with final decision mode: p = 0.07
margins, dydx(caFollowed caNotFollowed) at(ref = (0 1)) post
matrix margins = r(table)' // Saves marginal effects as variables
svmat margins, names(col)
sum b in 3
replace pe2 = `r(mean)' if d == 1 & mod == 0 & y == 2
sum b in 4
replace pe2 = `r(mean)' if d == 1 & mod == 1 & y == 2
sum b in 7
replace pe2 = `r(mean)' if d == 2 & mod == 0 & y == 2
sum b in 8
replace pe2 = `r(mean)' if d == 2 & mod == 1 & y == 2
sum se in 3
replace se2 = `r(mean)' if d == 1 & mod == 0 & y == 2
sum se in 4
replace se2 = `r(mean)' if d == 1 & mod == 1 & y == 2
sum se in 7
replace se2 = `r(mean)' if d == 2 & mod == 0 & y == 2
sum se in 8
replace se2 = `r(mean)' if d == 2 & mod == 1 & y == 2
drop b - eform

* Graph
gen d2 = d - 0.1 if mod == 0
replace d2 = d + 0.1 if mod == 1
gen lower = pe2 - 1.96 * se2
gen upper = pe2 + 1.96 * se2
label define dv 1 "Procedural fairness" 2 "Decision acceptance", replace
label values y dv
twoway ///
		(scatter d2 pe2 if mod == 0, mcolor(blue) msymbol(square)) ///
		(rspike lower upper d2 if mod == 0, lcolor(blue) horizontal) ///
		(scatter d2 pe2 if mod == 1, mcolor(red) msymbol(diamond)) ///
		(rspike lower upper d2 if mod == 1, lcolor(red) horizontal) ///
		, ///
		ytitle("") yscale(reverse range(0.5 2.5)) yscale(noline) ylabel(1 `""Marginal effect of DMP if" "recommendation honored""' 2 `""Marginal effect of DMP if" "recommendation not honored""', angle(horizontal) noticks nogrid) ///
		xtitle("") xscale(noextend nofextend) xline(0, lpattern(dash)) xlabel(-2(1)2, noticks nogrid) ///
		subtitle(, size(medium) color(black) fcolor(gs14) lcolor(gs14)) ///
		legend(order(1 "Parliament" 3 "Referendum") title("Final decision is made by:", size(medsmall)) region(fcolor(white) lcolor(white)))  ///
		by(y, iscale(*1.2) rows(2) noxrescale noiytick ixtitle iytitle) ///
		by(, note("{it:Note:} The spikes represent 95% confidence intervals. DMP = deliberative mini-public. ", span margin(0 0 0 4))) ///
		by(, legend(at(3) position(6))) ///
		by(, graphregion(fcolor(white) lcolor(white)) bgcolor(white)) ///
		scheme(s2mono) xsize(8) ysize(4)
		* Atlegend edits
		gr_edit .plotregion1.atlegend.xoffset = 59

* Tidy up
drop y - upper	





***********
** FIGURE 3
***********

gen dv = 1 in 1/6
replace dv = 2 in 7/12
label define dv 1 "Procedural fairness" 2 "Decision acceptance", replace
label values dv dv

gen x = _n if dv == 1
replace x = _n - 6 if dv == 2
label define x 1 "NoCAParl" 2 "CANotAliParl" 3 "CAAliParl" 4 "NoCARef" 5 "CANotAliRef" 6 "CAAliRef", replace
label values x x

gen pe = .
gen lower = .
gen upper = .

* Fairness
reg fair ibn.expgroup if haspos == 1 & comprehension_passed == 1 & speeder == 0, nocons coeflegend
replace pe = _b[1bn.expgroup] if dv == 1 & x == 1
replace lower =  _b[1bn.expgroup] - 1.96 * _se[1bn.expgroup] if dv == 1 & x == 1
replace upper =  _b[1bn.expgroup] + 1.96 * _se[1bn.expgroup] if dv == 1 & x == 1
replace pe = _b[5.expgroup] if dv == 1 & x == 2
replace lower =  _b[5.expgroup] - 1.96 * _se[5.expgroup] if dv == 1 & x == 2
replace upper =  _b[5.expgroup] + 1.96 * _se[5.expgroup] if dv == 1 & x == 2
replace pe = _b[3.expgroup] if dv == 1 & x == 3
replace lower =  _b[3.expgroup] - 1.96 * _se[3.expgroup] if dv == 1 & x == 3
replace upper =  _b[3.expgroup] + 1.96 * _se[3.expgroup] if dv == 1 & x == 3
replace pe = _b[2.expgroup] if dv == 1 & x == 4
replace lower =  _b[2.expgroup] - 1.96 * _se[2.expgroup] if dv == 1 & x == 4
replace upper =  _b[2.expgroup] + 1.96 * _se[2.expgroup] if dv == 1 & x == 4
replace pe = _b[6.expgroup] if dv == 1 & x == 5
replace lower =  _b[6.expgroup] - 1.96 * _se[6.expgroup] if dv == 1 & x == 5
replace upper =  _b[6.expgroup] + 1.96 * _se[6.expgroup] if dv == 1 & x == 5
replace pe = _b[4.expgroup] if dv == 1 & x == 6
replace lower =  _b[4.expgroup] - 1.96 * _se[4.expgroup] if dv == 1 & x == 6
replace upper =  _b[4.expgroup] + 1.96 * _se[4.expgroup] if dv == 1 & x == 6


* Decision acceptance
reg decacc ibn.expgroup if haspos == 1 & comprehension_passed == 1 & speeder == 0, nocons coeflegend
replace pe = _b[1bn.expgroup] if dv == 2 & x == 1
replace lower =  _b[1bn.expgroup] - 1.96 * _se[1bn.expgroup] if dv == 2 & x == 1
replace upper =  _b[1bn.expgroup] + 1.96 * _se[1bn.expgroup] if dv == 2 & x == 1
replace pe = _b[5.expgroup] if dv == 2 & x == 2
replace lower =  _b[5.expgroup] - 1.96 * _se[5.expgroup] if dv == 2 & x == 2
replace upper =  _b[5.expgroup] + 1.96 * _se[5.expgroup] if dv == 2 & x == 2
replace pe = _b[3.expgroup] if dv == 2 & x == 3
replace lower =  _b[3.expgroup] - 1.96 * _se[3.expgroup] if dv == 2 & x == 3
replace upper =  _b[3.expgroup] + 1.96 * _se[3.expgroup] if dv == 2 & x == 3
replace pe = _b[2.expgroup] if dv == 2 & x == 4
replace lower =  _b[2.expgroup] - 1.96 * _se[2.expgroup] if dv == 2 & x == 4
replace upper =  _b[2.expgroup] + 1.96 * _se[2.expgroup] if dv == 2 & x == 4
replace pe = _b[6.expgroup] if dv == 2 & x == 5
replace lower =  _b[6.expgroup] - 1.96 * _se[6.expgroup] if dv == 2 & x == 5
replace upper =  _b[6.expgroup] + 1.96 * _se[6.expgroup] if dv == 2 & x == 5
replace pe = _b[4.expgroup] if dv == 2 & x == 6
replace lower =  _b[4.expgroup] - 1.96 * _se[4.expgroup] if dv == 2 & x == 6
replace upper =  _b[4.expgroup] + 1.96 * _se[4.expgroup] if dv == 2 & x == 6


twoway 	(bar pe x if inrange(x,1,3), color(eltblue) barwidth(0.6)) ///
		(bar pe x if inrange(x,4,6), color(edkblue) barwidth(0.6)) ///
		(rcap lower upper x, lcolor(black)) ///
		, ///
			ytitle("") yscale(noextend nofextend) ylabel(0(2.5)10, angle(horizontal) nogrid) ///
			xtitle("") xscale(range(1 6)) xscale(noline) xlabel(1 `""No" "DMP""' 2 `""DMP" "not" "honored""' 3 `""DMP" "honored""' 4 `""No" "DMP""' 5 `""DMP" "not" "honored""' 6 `""DMP" "honored""', angle(horizontal) noticks) ///
			legend(order(1 "Parliament" 2 "Referendum") rows(1) nobox symxsize(*.6) title("Final decision is made by:", size(medsmall)) region(fcolor(white) lcolor(white))) ///
			subtitle(, size(large) color(black) fcolor(gs14) lcolor(gs14)) ///
			by(dv, imargin(medsmall) cols(2) xrescale noixtick iscale(*1)) plotregion(margin(4 4 0 4))	///
			by(, note("{it:Note:} The spikes represent 95% confidence intervals. DMP = Deliberative mini-public.", span margin(0 0 0 4))) ///
			by(, legend(on at(3) position(12))) ///
			by(, graphregion(fcolor(white) lcolor(white)) bgcolor(white)) ///
			scheme(s2mono) xsize(6) ysize(3) scale(1) 
			* Atlegend edits
			gr_edit .plotregion1.atlegend.xoffset = 51

* Tidy up
drop dv - upper	




***********
** FIGURE 4
***********

gen dv = 1 in 1/3
replace dv = 2 in 4/6
replace dv = 1 in 7/9
replace dv = 2 in 10/12
replace dv = 1 in 13/15
replace dv = 2 in 16/18
replace dv = 1 in 19/21
replace dv = 2 in 22/24
replace dv = 1 in 25/27
replace dv = 2 in 28/30
replace dv = 1 in 31/33
replace dv = 2 in 34/36
replace dv = 1 in 37/39
replace dv = 2 in 40/42
gen full = 1 in 1/6
replace full = 0 in 7/42
gen subgroup = . in 1/6
replace subgroup = 1 in 7/12
replace subgroup = 2 in 13/18
replace subgroup = 3 in 19/24
replace subgroup = 4 in 25/30
replace subgroup = 5 in 31/36
replace subgroup = 6 in 37/42
gen d = _n in 1/3
replace d = _n - 3 in 4/6
replace d = _n - 6 in 7/9
replace d = _n - 9 in 10/12
replace d = _n - 12 in 13/15
replace d = _n - 15 in 16/18
replace d = _n - 18 in 19/21
replace d = _n - 21 in 22/24
replace d = _n - 24 in 25/27
replace d = _n - 27 in 28/30
replace d = _n - 30 in 31/33
replace d = _n - 33 in 34/36
replace d = _n - 36 in 37/39
replace d = _n - 39 in 40/42
gen pe = .
gen se = .

* Full sample
reg fair i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0, coeflegend
replace pe = _b[1.caFollowed] if dv == 1 & full == 1 & d == 1
replace se = _se[1.caFollowed] if dv == 1 & full == 1 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 1 & full == 1 & d == 2
replace se = _se[1.caNotFollowed] if dv == 1 & full == 1 & d == 2
replace pe = _b[1.ref] if dv == 1 & full == 1 & d == 3
replace se = _se[1.ref] if dv == 1 & full == 1 & d == 3
reg decacc i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0, coeflegend
replace pe = _b[1.caFollowed] if dv == 2 & full == 1 & d == 1
replace se = _se[1.caFollowed] if dv == 2 & full == 1 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 2 & full == 1 & d == 2
replace se = _se[1.caNotFollowed] if dv == 2 & full == 1 & d == 2
replace pe = _b[1.ref] if dv == 2 & full == 1 & d == 3
replace se = _se[1.ref] if dv == 2 & full == 1 & d == 3

* Low trust
reg fair i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & inrange(poltrust,0,5), coeflegend
replace pe = _b[1.caFollowed] if dv == 1 & subgroup == 1 & d == 1
replace se = _se[1.caFollowed] if dv == 1 & subgroup == 1 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 1 & subgroup == 1 & d == 2
replace se = _se[1.caNotFollowed] if dv == 1 & subgroup == 1 & d == 2
replace pe = _b[1.ref] if dv == 1 & subgroup == 1 & d == 3
replace se = _se[1.ref] if dv == 1 & subgroup == 1 & d == 3
reg decacc i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & inrange(poltrust,0,5), coeflegend
replace pe = _b[1.caFollowed] if dv == 2 & subgroup == 1 & d == 1
replace se = _se[1.caFollowed] if dv == 2 & subgroup == 1 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 2 & subgroup == 1 & d == 2
replace se = _se[1.caNotFollowed] if dv == 2 & subgroup == 1 & d == 2
replace pe = _b[1.ref] if dv == 2 & subgroup == 1 & d == 3
replace se = _se[1.ref] if dv == 2 & subgroup == 1 & d == 3

* High trust
reg fair i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & inrange(poltrust,6,10), coeflegend
replace pe = _b[1.caFollowed] if dv == 1 & subgroup == 2 & d == 1
replace se = _se[1.caFollowed] if dv == 1 & subgroup == 2 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 1 & subgroup == 2 & d == 2
replace se = _se[1.caNotFollowed] if dv == 1 & subgroup == 2 & d == 2
replace pe = _b[1.ref] if dv == 1 & subgroup == 2 & d == 3
replace se = _se[1.ref] if dv == 1 & subgroup == 2 & d == 3
reg decacc i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & inrange(poltrust,6,10), coeflegend
replace pe = _b[1.caFollowed] if dv == 2 & subgroup == 2 & d == 1
replace se = _se[1.caFollowed] if dv == 2 & subgroup == 2 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 2 & subgroup == 2 & d == 2
replace se = _se[1.caNotFollowed] if dv == 2 & subgroup == 2 & d == 2
replace pe = _b[1.ref] if dv == 2 & subgroup == 2 & d == 3
replace se = _se[1.ref] if dv == 2 & subgroup == 2 & d == 3

* Low importance
reg fair i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & inrange(importance,0,5), coeflegend
replace pe = _b[1.caFollowed] if dv == 1 & subgroup == 3 & d == 1
replace se = _se[1.caFollowed] if dv == 1 & subgroup == 3 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 1 & subgroup == 3 & d == 2
replace se = _se[1.caNotFollowed] if dv == 1 & subgroup == 3 & d == 2
replace pe = _b[1.ref] if dv == 1 & subgroup == 3 & d == 3
replace se = _se[1.ref] if dv == 1 & subgroup == 3 & d == 3
reg decacc i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & inrange(importance,0,5), coeflegend
replace pe = _b[1.caFollowed] if dv == 2 & subgroup == 3 & d == 1
replace se = _se[1.caFollowed] if dv == 2 & subgroup == 3 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 2 & subgroup == 3 & d == 2
replace se = _se[1.caNotFollowed] if dv == 2 & subgroup == 3 & d == 2
replace pe = _b[1.ref] if dv == 2 & subgroup == 3 & d == 3
replace se = _se[1.ref] if dv == 2 & subgroup == 3 & d == 3

* High importance
reg fair i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & inrange(importance,6,10), coeflegend
replace pe = _b[1.caFollowed] if dv == 1 & subgroup == 4 & d == 1
replace se = _se[1.caFollowed] if dv == 1 & subgroup == 4 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 1 & subgroup == 4 & d == 2
replace se = _se[1.caNotFollowed] if dv == 1 & subgroup == 4 & d == 2
replace pe = _b[1.ref] if dv == 1 & subgroup == 4 & d == 3
replace se = _se[1.ref] if dv == 1 & subgroup == 4 & d == 3
reg decacc i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & inrange(importance,6,10), coeflegend
replace pe = _b[1.caFollowed] if dv == 2 & subgroup == 4 & d == 1
replace se = _se[1.caFollowed] if dv == 2 & subgroup == 4 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 2 & subgroup == 4 & d == 2
replace se = _se[1.caNotFollowed] if dv == 2 & subgroup == 4 & d == 2
replace pe = _b[1.ref] if dv == 2 & subgroup == 4 & d == 3
replace se = _se[1.ref] if dv == 2 & subgroup == 4 & d == 3

* Weak preference
reg fair i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & strongpos == 0, coeflegend
replace pe = _b[1.caFollowed] if dv == 1 & subgroup == 5 & d == 1
replace se = _se[1.caFollowed] if dv == 1 & subgroup == 5 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 1 & subgroup == 5 & d == 2
replace se = _se[1.caNotFollowed] if dv == 1 & subgroup == 5 & d == 2
replace pe = _b[1.ref] if dv == 1 & subgroup == 5 & d == 3
replace se = _se[1.ref] if dv == 1 & subgroup == 5 & d == 3
reg decacc i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & strongpos == 0, coeflegend
replace pe = _b[1.caFollowed] if dv == 2 & subgroup == 5 & d == 1
replace se = _se[1.caFollowed] if dv == 2 & subgroup == 5 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 2 & subgroup == 5 & d == 2
replace se = _se[1.caNotFollowed] if dv == 2 & subgroup == 5 & d == 2
replace pe = _b[1.ref] if dv == 2 & subgroup == 5 & d == 3
replace se = _se[1.ref] if dv == 2 & subgroup == 5 & d == 3

* Strong preference
reg fair i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & strongpos == 1, coeflegend
replace pe = _b[1.caFollowed] if dv == 1 & subgroup == 6 & d == 1
replace se = _se[1.caFollowed] if dv == 1 & subgroup == 6 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 1 & subgroup == 6 & d == 2
replace se = _se[1.caNotFollowed] if dv == 1 & subgroup == 6 & d == 2
replace pe = _b[1.ref] if dv == 1 & subgroup == 6 & d == 3
replace se = _se[1.ref] if dv == 1 & subgroup == 6 & d == 3
reg decacc i.caFollowed i.caNotFollowed i.ref if haspos == 1 & comprehension_passed == 1 & speeder == 0 & strongpos == 1, coeflegend
replace pe = _b[1.caFollowed] if dv == 2 & subgroup == 6 & d == 1
replace se = _se[1.caFollowed] if dv == 2 & subgroup == 6 & d == 1
replace pe = _b[1.caNotFollowed] if dv == 2 & subgroup == 6 & d == 2
replace se = _se[1.caNotFollowed] if dv == 2 & subgroup == 6 & d == 2
replace pe = _b[1.ref] if dv == 2 & subgroup == 6 & d == 3
replace se = _se[1.ref] if dv == 2 & subgroup == 6 & d == 3

* Graph
gen d2 = d - 0.30 if full == 1
replace d2 = d - 0.20 if subgroup == 1
replace d2 = d - 0.10 if subgroup == 2
replace d2 = d if subgroup == 3
replace d2 = d + 0.10 if subgroup == 4
replace d2 = d + 0.20 if subgroup == 5
replace d2 = d + 0.30 if subgroup == 6

gen lower = pe - 1.96 * se
gen upper = pe + 1.96 * se
label define dv 1 "Procedural fairness" 2 "Decision acceptance", replace
label values dv dv
twoway ///
		(scatter d2 pe if full == 1, mcolor(black) msymbol(circle)) ///
		(rspike lower upper d2 if full == 1, lcolor(black) horizontal) ///
		(scatter d2 pe if subgroup == 1, mcolor(red) msymbol(circle)) ///
		(rspike lower upper d2 if subgroup == 1, lcolor(red) horizontal) ///
		(scatter d2 pe if subgroup == 2, mcolor(red) msymbol(triangle)) ///
		(rspike lower upper d2 if subgroup == 2, lcolor(red) horizontal) ///
		(scatter d2 pe if subgroup == 3, mcolor(dkgreen) msymbol(circle)) ///
		(rspike lower upper d2 if subgroup == 3, lcolor(dkgreen) horizontal) ///
		(scatter d2 pe if subgroup == 4, mcolor(dkgreen) msymbol(triangle)) ///
		(rspike lower upper d2 if subgroup == 4, lcolor(dkgreen) horizontal) ///
		(scatter d2 pe if subgroup == 5, mcolor(blue) msymbol(circle)) ///
		(rspike lower upper d2 if subgroup == 5, lcolor(blue) horizontal) ///
		(scatter d2 pe if subgroup == 6, mcolor(blue) msymbol(triangle)) ///
		(rspike lower upper d2 if subgroup == 6, lcolor(blue) horizontal) ///
		, ///
		ytitle("") yscale(reverse range(0.5 3.5)) yscale(noline) ///
		ylabel(1 "DMP honored" 2 "DMP not honored" 3 "Referendum", angle(horizontal) noticks nogrid) ///
		xtitle("") xscale(noextend nofextend) xline(0, lpattern(dash)) xlabel(-2(1)2, noticks nogrid) ///
		by(dv, cols(3) noxrescale noiytick ixtitle iytitle) ///
		by(, note("{it:Note:} The spikes represent 95% confidence intervals. DMP = deliberative mini-public. ", span margin(0 0 0 4))) ///
		by(, legend(on at(3) position(3))) ///
		by(, graphregion(fcolor(white) lcolor(white)) bgcolor(white)) ///
		legend(order(1 "Full sample" 3 "Low political trust" 5 "High political trust" 7 "Low policy importance" 9 "High policy importance" 11 "Weak policy preference" 13 "Strong policy preference") cols(1) region(fcolor(white) lcolor(white)))  ///
		subtitle(, color(black) fcolor(gs14) lcolor(gs14)) ///
		scheme(s2mono) xsize(8) ysize(4)

* Tidy up
drop dv - upper	
	